Graphical user interfaces for computers typically employ a variety of different types of control elements, or objects, that are actuated by the user of the computer to select from available choices and otherwise control the operation of the computer. For example, to perform a particular action with the computer, the user interface might cause one or more check boxes or push buttons to be displayed, to enable the user to turn certain features on or off, or to indicate acceptance of a displayed set of parameters and continue with a procedure.
Another control element that is commonly employed in a graphical user interface is a scroll bar. Typically, scroll bars are used in connection with windows, which function as containers for displaying the contents of a document. When the area of a window appearing on a monitor is not large enough to display the entire contents of a document, a scroll bar can be employed to position the window over different parts of the document, to enable the user to view the desired portion of the document.
Basically, a conventional scroll bar consists of four main elements, namely an elongated background area, a movable thumb which slides along the length of the background area and a pair of indicators, such as arrows, at either end of the background area to identify the relative directions of movement of the thumb. In operation, a user actuates the scroll bar by "grabbing" the thumb and sliding it along the background area. The action of grabbing the thumb can be carried out by positioning a cursor over the thumb and clicking a mouse button, or analogous control device. Moving the cursor during this state causes the thumb to be repositioned along the background area. The displayed contents of the window "scrolls" to a different portion of the document which corresponds to the new position of the thumb. The scrolling of the document's contents can be dynamic, or "live", in which case the displayed contents move within the window as the cursor is being moved. Alternatively, the scrolling of the document's contents can await the release of the mouse button. In this case, it is desirable to display a transparent image of the thumb while the cursor is being moved, so that the user can determine the new position of the thumb relative to its original position.
As the thumb is being moved by the user, the structure of the scroll bar, or at least that of the thumb, must be continually redrawn on the display, to update its position. To avoid flickering, the redrawing of the scroll bar must be carried out frequently. To this end, therefore, conventional routines for drawing the scroll bar are relatively simple, to permit them to be implemented in a short amount of time. Along these lines, since a rectangle is one of the easiest graphical objects to draw on a display, the elements of conventional scroll bars, particularly the thumb, have had a rectangular shape that was determined by the designer of the graphical interface.
Recently, there has been a move towards providing greater variety of appearance in graphical user interfaces. For example, U.S. patent application Ser. No. 08/243,327, filed May 16, 1994, discloses a user interface that can be customized to present different appearances that accommodate different users's tastes. Different user interface appearances, or themes, can be designed by different software developers, or even the users themselves. In concert with this movement to provide a greater variety in the user interface, it is desirable to provide a method for tracking and redrawing a thumb on a scroll bar, which is not constrained to the use of rectangular objects, to thereby provide flexibility in the appearance of the scroll bar elements.
In the past, scroll bars operated in either a live mode or a "ghost" mode. As described previously, in the live mode, the thumb and the displayed contents of a document moved with the cursor. In the ghost mode, the thumb and the displayed contents remained stationary until the mouse button was released, and only the transparent image of the thumb moved with the cursor. Because the displayed images differed for the two modes, each mode of operation required a different procedure for redrawing the position of the thumb. The particular mode of operation was fixed as part of the code for the graphical user interface, and could not be readily changed to the other mode, without rewriting the code.
To permit greater flexibility in the customization of the graphical user interface, it is further desirable to provide a scroll bar thumb tracking and redrawing procedure which is generic to both the live and ghost modes of scrolling, and thereby enables the user interface to be easily switched between the two modes of operation.